In networking applications, an incoming packet enters an input port of a network component, such as a data processing node or a switch, wherein the network component processes the incoming packet and directs it to an output port. In processing the incoming packet, the network component can examine the incoming packet on the input side of the network component, and can determine addressing and routing information to enhance network performance.
For instance, network components, such as an Ethernet switch, can have several output ports, trunked together either externally or in the backplane of a chassis based switch. Trunking involves the use of multiple network cables or ports in parallel. Trunks may be used to interconnect switches to form networks. Trunking increases the link speed beyond the limits of any single cable or port. Often, distribution of packet traffic is not done evenly across the trunked ports causing inefficient use of the total available bandwidth.
Current trunk distribution technology can lead to congestion, for example, a large number of traffic flows being distributed down certain ports while other ports have only a light amount of traffic distributed to them. This can cause the trunk group to function inefficiently by not being able to carry as much traffic as would be possible if the flows were evenly distributed.
In addition, different ports in a trunk may take different amounts of time to transmit a packet. Thus, packet traffic can sometimes be delivered to their final destination out of order, causing significant delay or failures in the transmission of information across the communication network. Almost all high level networking protocols require that the data packets associated with them arrive in order. Thus, packets of data should not be randomly distributed among different lines of a trunk group.
When a related flow of data packets, such as an Ethernet flow, is sent through a group of ports that are trunked together, the flow must be sent down a single port. If packets from the same flow are sent down different ports, it is possible that they will be delivered out of order. Delivering packets out of order causes a very detrimental effect on higher layer Ethernet protocols such as Transmission Control Protocols/Internet Protocol (TCP/IP).
When a group of several ports are trunked together, an algorithm is needed to distribute flows of traffic, such as Internet Protocol (IP) traffic, evenly so that the total available bandwidth can be used. However, as described above, each flow between network endpoints must go down a single port of the trunk to ensure that the packets are not delivered to their final destination out of order.
A typical trunk distribution algorithm involves manipulating various fields within the header structure of a packet to form a hash value and this value is used to determine the port to which the packet will be sent. The hash algorithm used is typically the Exclusive OR (XOR), or sometimes, a Cyclic Redundancy Check (CRC), such as CRC16. Using a CRC redundancy check on different fields of the packet distributes data packets in a more random way than the use of an XOR hash. A hash key is created and then a part of the key field is used as an index in order to determine which port in the trunk will be used. A relatively simple hash distribution algorithm is important because the hash value must be calculated for each packet at the rate at which it arrives at the switch chip (i.e. at “wire speed”).
However, these algorithms tend to fail during testing with artificially generated test traffic when certain fields are incremented together to define each flow. When the fields are processed using the XOR operation, a single index is produced and all the traffic is directed down a single port of the trunk. Similar problems are found in real world systems such as server farms which have very similar header fields for each flow.
In these typical systems, there is usually some degree of control provided over what fields are used in the calculation of the hash value. This degree of control usually allows the use of any of: just Layer 2 (L2) fields; L2 and Layer 3 (L3) fields; or L2 , L3 , and L4 fields. “Layer” references, such as Layer 2 (L2) and Layer 3 (L3) refer to the Open Systems Interconnection (OSI) seven layer model. However, finer control of the fields may be provided. There may also be some degree of control over the hash algorithm. For example, a selection between XOR and CRC16 hash generation may be provided.
However, regardless of the degree of control provided over what fields are used in the calculation of the hash value and over the hash algorithm, these algorithms are fixed by the logical design of the switch chip with which they are used and these algorithms cannot be readily changed to adapt to changing network conditions or congestion caused by a particular test configuration.